package com.redijedi.tapestry5;

import java.util.Map;

/**
 * A single node within a {@link TreeModel}.
 * 
 * @author torr
 * 
 */
public interface TreeNodeModel {

	/**
	 * Additional attributes to render with the &lt;tree&gt;. This is often used
	 * to render the CSS class attribute. May return null.
	 */
	abstract Map<String, String> getAttributes();

	/**
	 * Used for creating client side id attributes.
	 */
	abstract String getId();

	/**
	 * The server-side value represented by this node. Used to get a reference
	 * to the nodes as the tree is traversed.
	 */
	abstract Object getValue();
	
	abstract Iterable<? extends TreeNodeModel> getChildren();

}
